<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePartScheduleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('part_schedule', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('part_id')->nullable()->index()->comment('兼职表ID');
            $table->text('content')->comment('跟进内容');
            $table->text('details')->comment('合同细节');
            $table->unsignedInteger('attachment')->nullable()->comment('合同附件');
            $table->unsignedInteger('uid')->nullable()->comment('跟进人');
            $table->unsignedInteger('assign')->nullable()->comment('归属人');
            $table->unsignedInteger('result')->default(1)->comment('跟进结果 1待沟通,2有意向，跟进中,3未签合约,4已签合同,5不考虑');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('part_schedule');
    }
}
